package com.example.foobar.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.foobar.business.service.DaConfigService;
import com.example.foobar.dao.service.DaConfigDaoService;
import com.example.foobar.entity.DaConfig;
import com.example.foobar.mapper.DaConfigMapper;
import com.example.foobar.param.DaConfigPageParam;
import io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl;
import io.geekidea.springbootplus.framework.core.pagination.PageInfo;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 分析系统配置文件 服务实现类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
@Slf4j
@Service
public class DaConfigServiceImpl implements DaConfigService {

    @Autowired
    private DaConfigDaoService daConfigDaoService;

    public boolean saveDaConfig(DaConfig daConfig){
        return daConfigDaoService.save(daConfig);
    }

    public boolean updateDaConfig(DaConfig daConfig){
        return daConfigDaoService.updateById(daConfig);
    }

    public boolean deleteDaConfig(Long id){
        return daConfigDaoService.removeById(id);
    }

    @Override
    public Paging<DaConfig> getDaConfigPageList(DaConfigPageParam daConfigPageParam) throws Exception {
        return daConfigDaoService.getDaConfigPageList(daConfigPageParam);
    }

    @Override
    public DaConfig getById(Long id) {
        return daConfigDaoService.getById(id);
    }


}
